Fully customizable SwiftUI Video Player for iOS and tvOS

製品情報

¥74,375
cart 買い物カゴに追加 favorites お気に入りに追加
ユーザーガイド 画像 プレビュー 動画

デベロッパー

avatar
Michael wyndot
コードサンプルのリクエスト ダイレクトメッセージ

2024年06月25日

公開チャット

製品詳細



MPlayer - Customizable Video Player for SwiftUI



MPlayer is a cutting-edge video player designed exclusively for SwiftUI, offering unparalleled customization options for developers. Unlike traditional Apple video players like VideoPlayer and AVPlayerViewController, MPlayer empowers developers with complete control over the user interface and player functionality, enabling the creation of unique and branded video playback experiences.



Key Features:



  • Full Customization: Tailor every aspect of the video player UI to match your application's design and user experience requirements.

  • SwiftUI Integration: Seamlessly integrates into SwiftUI projects, leveraging the declarative syntax and powerful capabilities of SwiftUI.

  • Advanced Features: Supports custom control buttons, progress bars, thumbnail seeking, and interactive elements for a rich viewing experience.

  • Extensibility: Designed to be extensible, allowing developers to add new functionalities and customize existing ones to meet specific application needs.



MPlayer is the ultimate solution for developers seeking to transcend the limitations of standard video players and deliver a truly unique and engaging video playback experience within their SwiftUI applications.



Features:



  • MPlayer is specifically designed for SwiftUI and is easy to use.

  • Enjoy full customization options to create a tailored video player.

  • Supports thumbnail seeking for quick navigation.

  • Compatible with AirPlay for seamless streaming.

  • Picture-in-Picture (PiP) support for multitasking.

  • Integrates with Media Player Now Playing Info Update for enhanced control.



- MPlayer is designed specifically for SwiftUI and simple to use
- MPlayer is fully customizable
- MPlayer supports thumbnail seeking
- MPlayer supports AirPlay
- MPlayer supports PiP
- MPlayer supports Media Player Now Playing Info Update

インストール手順

1. Unzip the package to a folder accessable from your XCode project
2. In XCode, File -> Add Package Dependences
3. In the XCode Add Package Dependencies dialog, Click on `Add Local...` and select your package folder and click on `Add Package`.
4. In your code, define your `Playable` item, here is an example
struct VOD: Playable {
let url: URL
let thumbnailVideoUrl: URL?
let posterUrl: URL
let title: String
let description: String
let isVideo: Bool = true
let isLiveStream: Bool = false
var artwork: MPMediaItemArtwork?
}

extension VOD {
static var sintel: VOD {
VOD(url: URL(string: "https://media-io.s3.us-west-1.amazonaws.com/sintel/playlist.m3u8")!,
thumbnailVideoUrl: URL(string: "https://media-io.s3.us-west-1.amazonaws.com/sintel-thumbnail/sintel-thumbnail.mp4")!,
posterUrl: URL(string: "https://media-io.s3.us-west-1.amazonaws.com/Poster.jpg")!,
title: "Sintel",
description: "Sintel is an open movie from the Blender Foundation licensed under the Creative Commons Attribution 3.0 license.")
}
}
5. Then you can use the `PlayerView` anywhere in your code
PlayerView(asset: VOD.sintel,
configuration: PlayerConfiguration(controlsDismissTimeout: 10, stepInterval: 15, scrubber: .default, seekbarStyle: .default, style: .init()))
6. To customize the Player, use `PlayerConfiguration`, `PLayerStyle, `SeekBarStyle`, `ScrubberStyle` and `VolumeBarStyle`.

変更と適応の手順

To support thumbnail seeking, you need provide a smaller compressed video Url. Your can use ffmpeg to compress the video
ffmpeg -I 2048-stereo.mp4 -vf "scale=-1:110" -c:v libx264 -crf 28 -preset veryfast -an -movflags faststart sintel-thumbnail.mp

To customize the Player, use `PlayerConfiguration`.
struct PlayerConfiguration {
let controlsDismissTimeout: TimeInterval // in seconds
let stepInterval: Int // every step is 5 seconds, if specify 2, player will forward / backward 10 seconds every step
let scrubber: ScrubberConfiguration
let seekbarStyle: SeekBarStyle
let style: PLayerStyle
}

struct PLayerStyle {
let playImage: Image
let pauseImage: Image
let goforwardImage: Image
let gobackwardImage: Image
let optionsImage: Image
let optionCheckmarkImage: Image
let accentColor: Color
let borderColor: Color
let backgrounColor: Color
let playPauseButtonSize: CGSize
let forwardBackwordButtonSize: CGSize
let airplayButtonSize: CGSize
let pipButtonSize: CGSize
let optionsButtonSize: CGSize
let optionsMenuMinSize: CGSize
let optionsMenuCornerRadius: CGFloat
let optionsMenuBackgroundColor: Color
let optionsMenuTextColor: Color
}

public struct SeekBarStyle {
let scrubberStyle: ScrubberStyle
let thumbnailHeight: CGFloat
let timeFont: Font
}

struct ScrubberStyle {
let height: CGFloat
let padding: CGFloat
let cornerRadius: CGFloat
let backgroundColor: Color
let highlightColor: Color
let outlineWidth: CGFloat
let outlineColor: Color
}

public struct VolumeBarStyle {
let scrubberStyle: ScrubberStyle
let mutedImage: Image
let volume1Image: Image
let volume2Image: Image
let volume3Image: Image
let buttonSize: CGSize
}

価格情報

価格の統計

最高価格
¥74,375
平均価格
¥74,375
最低価格
¥74,375
AI価格予測
¥NA

インサイト

限定プレビュー


実際の製品には、すべてのファイルと完全なコードが含まれています。

依存パッケージ

依存パッケージを表示する

ランダムサンプルファイル

プロジェクトファイルの統計

階層

サンプルファイルを選択してください
X
user-symbol

Stay in touch

ビジネスおよび開発者向けの実用的な最新情報をご希望ですか?

ソースコードプロジェクトに対するPieceXコミュニティのニーズについてご提供します。

PieceXの最新の無料コミュニティコードプロジェクトをいち早くお知らせします。